import React, { PureComponent } from "react"

// 定义一个高阶组件
function hoc(Cpn) {
    // 1.定义类组件
    class HelloWorld extends PureComponent {
        render() {
            return <Cpn />
        }
    }

    return HelloWorld
    // 2.函数组件
}
class HelloWorld2 extends PureComponent {
    render() {
        return <h1>Hello World2</h1>
    }
}

const TestCom = hoc(HelloWorld2)

export class app extends PureComponent {
    render() {
        return <TestCom />
    }
}

export default app
